package com.xkstream.client.api;

import com.xkstream.client.base.BaseData;
import com.xkstream.client.entity.Area;
import com.xkstream.client.entity.User;
import com.xkstream.client.entity.kt.GainsData;
import com.xkstream.client.entity.kt.GiftRankingData;
import com.xkstream.client.entity.kt.RewardData;

import java.util.List;
import java.util.Map;

import io.reactivex.Observable;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;

/**
 * Created by xiaoyi on 2017/8/24.
 */

public interface UserService {
    /**
     * 用户登录
     */
    @FormUrlEncoded
    @POST(API.USER_LOGIN)
    Observable<BaseData<User>> userLogin(@FieldMap Map<String, Object> params);

    /**
     * 获取地区列表
     */
    @POST(API.AREA_CODE)
    Observable<BaseData<List<Area>>> getAreaList();

    /**
     * 注册主播
     */
    @Deprecated
    @FormUrlEncoded
    @POST(API.REGISTER_ANCHOR)
    Observable<BaseData> anchorRegister(@FieldMap Map<String, String> params);


    /**
     * 注册主播v2
     */
    @FormUrlEncoded
    @POST(API.ANCHOR_REGISTER)
    Observable<BaseData> anchorRegisterV2(@FieldMap Map<String, Object> params);

    /**
     * 密码找回
     */
    @FormUrlEncoded
    @POST(API.RESET_PWD)
    Observable<BaseData> resetPassword(@FieldMap Map<String, Object> params);

    /**
     * 主播申请
     */
    @FormUrlEncoded
    @POST(API.ANCHOR_APPLY)
    Observable<BaseData> applyAnchor(@FieldMap Map<String, Object> params);

    /**
     * 收益记录-礼物排行
     */
    @FormUrlEncoded
    @POST(API.GIFT_RANKING_V2)
    Observable<BaseData<GiftRankingData>> getGiftRanking(@FieldMap Map<String, Object> params);

    /**
     * 收益记录-今日收益
     */
    @FormUrlEncoded
    @POST(API.TODAY_GAINS)
    Observable<BaseData<GainsData>> getTodayGains(@FieldMap Map<String, Object> params);

    /**
     * 分成奖励
     */
    @FormUrlEncoded
    @POST(API.REWARD_INFO)
    Observable<BaseData<RewardData>> getRewardInfo(@FieldMap Map<String, Object> parasm);

}
